<template>
	<view>
		<u-navbar title=" " :titleStyle="{color:'#fff'}"  placeholder bgColor="#fe7200">
			<view class="u-nav-slot" slot="left">
				<u-icon name="arrow-left" size="19" color="#fe7200"></u-icon>
			</view>
		</u-navbar>
		<view class="headbgc">
			<view class="flexleft" @click="login" v-if="!is_login">
				<image src="@/static/image/system/weidenglu.png" class="headimg margin_right" mode=""></image>
				<view class="flexbetween" style="width: 100%;">
					<view class="titletext bai_text bold">未登录，点击登录</view>
					<u-icon name="arrow-right" size="12" color="#fff"></u-icon>
				</view>
			</view>
			<view class="flexleft" v-if="is_login" @click="jumpurl('/pages/wode/gerenxx')">
				<image :src="userInfo.avatar_text" class="headimg margin_right" mode=""></image>
				<view class="flexbetween" style="width: 100%;">
					<view class="flexcolumnbet" style="height: 100rpx;">
						<view class="titletext bai_text bold">{{userInfo.nickname}}</view>
						<view class="xiaobai" style="color: #DFDFDF;">{{userInfo.mobile}}</view>
					</view>
					<u-icon name="arrow-right" size="12" color="#fff"></u-icon>
				</view>
			</view>
		</view>
		<view class="mainpadding">
			<view class="ffffff radius" style="border-radius: 16rpx; padding: 40rpx 30rpx;">
				<view class="flexbetween pdl" @click="jumpurl('/pages/wode/wodesc')">
					<view class="flexleft">
						<u-icon name="star" size="19" color="#fe7200"></u-icon>
						<view class="titletext hei_text bold margin_left">我的收藏</view>
					</view>
					<u-icon name="arrow-right" size="16" color="#999"></u-icon>
				</view>
				<view class="flexbetween margin_top4 pdl" @click="jumpurl('/pages/wode/wodexx')">
					<view class="flexleft">
						<u-icon name="bell" size="19" color="#fe7200"></u-icon>
						<view class="titletext hei_text bold margin_left">我的消息</view>
					</view>
					<u-icon name="arrow-right" size="16" color="#999"></u-icon>
				</view>
				<view class="flexbetween margin_top4 pdl" @click="kefushow=true">
					<view class="flexleft">
						<u-icon name="server-man" size="19" color="#fe7200"></u-icon>
						<view class="titletext hei_text bold margin_left">联系我们</view>
					</view>
					<u-icon name="arrow-right" size="16" color="#999"></u-icon>
				</view>
				<view class="margin_top4 flexbetween" @click="jumpurl('/pages/wode/shezhi')">
					<view class="flexleft">
						<u-icon name="setting" size="19" color="#fe7200"></u-icon>
						<view class="titletext hei_text bold margin_left">设置</view>
					</view>
					<u-icon name="arrow-right" size="16" color="#999"></u-icon>
				</view>
				<!-- <view class="margin_top4 flexbetween" @click="jumpurl('/pages/system/system?type=3')">
					<view class="flexleft">
						<u-icon name="account" size="19" color="#fe7200"></u-icon>
						<view class="titletext hei_text bold margin_left">关于我们</view>
					</view>
					<u-icon name="arrow-right" size="16" color="#999"></u-icon>
				</view> -->
			</view>
		</view>
		<kefu :kefushow="kefushow" @closed="kefushow=false"></kefu>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				kefushow:false,
				is_login: false,
				userInfo: {},
			}
		},
		onShow() {
			this.is_login = httpRequest.checkIsLogin();
			if (this.is_login) {
				this.init()
			}
		},
		onShareAppMessage: function(options) {
			return {
				title: '制片宝',
				imageUrl: '',
				path: '/pages/index/index'
			}
		},
		onShareTimeline: function() {
			return {
				title: '制片宝',
				imageUrl: '',
				path: '/pages/index/index'
			}
		},
		methods: {
			returndj(val) {
				if (val == 1) return "V0"
				if (val == 2) return "V1"
				if (val == 3) return "V2"
				if (val == 4) return "V3"
			},
			init() {
				httpRequest.request('user/index', 'GET', {}).then(res => {
					this.userInfo = res.data
				})
			},
			login() {
				uni.navigateTo({
					url: "/pages/login/login"
				})
			},
			jumpurl(url) {
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/login"
					})
					return false
				}
				uni.navigateTo({
					url
				})
			},
			sijirz() {
				if (!httpRequest.checkIsLogin()) {
					uni.navigateTo({
						url: "/pages/login/appLogin"
					})
					return false
				}
				uni.navigateTo({
					url: "/pages/mine/shimingrz"
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.headbgc {
		background: linear-gradient(180deg, #fe7200 0%, rgba(254, 114, 0, .8) 100%);
		padding: 30rpx 30rpx 40rpx;

	}

	.topcontent {
		padding: 30rpx 40rpx;
		background: rgba(255, 255, 255, 0.2);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		border: 1rpx solid rgba(255, 255, 255, 0.6);
	}

	.myline {
		width: 1rpx;
		height: 40rpx;
		background-color: rgba(255, 255, 255, 0.4);
	}

	.myicon {
		width: 38rpx;
		height: 38rpx;
		min-width: 38rpx;
	}

	.pdl {
		padding-bottom: 40rpx
	}
</style>